<!DOCTYPE html>
<html lang="en">

	<include file="Public:header" />
	<include file="Public:page_css" />

	<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">

		<include file="Public:nav" />

		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content no-padding">
						<ul class="list-group">
							<li class="list-group-item">
								<p class="text-success"><a href="{:U('Index/index')}" title="返回首页" class="tip-bottom"><i class="fa fa-home"></i> 首页</a> /
									<a href="#" class="tip-bottom"> 新闻管理</a> / <a href="{:U('news/index')}" class="tip-bottom">新闻管理</a></p>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
		<a href="{:U('news/add')}" class="btn btn-primary">添加新闻</a>
		<br />
		<br />
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5><i class="fa fa-tasks"></i> 新闻管理</h5>
					</div>
					<div class="ibox-content">
						<table class="table table-bordered">
							<thead>
								<tr class="long-tr">
									<th width="5%">编号</th>
                                    <th>标题</th>
                                    <th>缩略图</th>
                                    <th>类别</th>
                                    <th width="8%">浏览量</th>
                                    <th width="10%">添加日期</th>
                                    <th width="20%">操作</th>
								</tr>
							</thead>
							<tbody>
								<volist name="list" id="vo">
									<tr class="long-td">
										<td>{$vo.id}</td>
                                        <td> {$vo.title}</td>
                                        <td><img src="__ROOT__/Uploads/{$vo.image_url}" style="width: 120px; height: 80px;"/></td> 
                                      	<td> 
                                      		<volist name="list1" id="v">
                                      			<if condition="$vo[cate_id] eq $v[id]">
                                      				{$v.catename}
                                      			</if>
                                      		</volist>
                                      	</td>
                                      	<td>{$vo.view}次</td>
                                       <td>{$vo.add_time|date='Y-m-d',###}</td>
										<td>
											<a href="{:U('News/edit',array('id'=>$vo['id']))}" class="btn btn-primary">
												<i class="fa fa-pencil"></i> 编辑</a>&nbsp;&nbsp;
											<a onClick="return confirm('是否删除此条记录')" href="{:U('News/del',array('id'=>$vo['id']))}" class="btn btn-danger">
												<i class="fa fa-trash-o"></i> 删除</a>
										</td>
									</tr>
								</volist>
							</tbody>
						</table>
						<div class="pages" style=" text-align: right;">
							{$page}
						</div>
					</div>
				</div>
			</div>
		</div>
		<include file="Public:footer" />

	</body>

</html>
